days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
temp_C = [30.5, 32.6, 31.8, 33.4, 29.8, 30.2, 29.9]

print(list(zip(days, temp_C)))

for k, v in zip(days, temp_C):
    print(k, v)


weekly_temp = {k: v for k, v in zip(days, temp_C)}
print(weekly_temp)
print(weekly_temp.items())
# 超过气温超过30
weekly_temp_high = {day: temp for day, temp in weekly_temp.items() if temp > 30}
print(weekly_temp_high)
prices = {"Nike": 45, "LiNing": 80, "Adidas": 120}
t = {k: v * 3 for k, v in prices.items() if v * 3 < 200}
print(t)


shop = {
    "Jo Malone": ("Perfume", 200),
    "Byredo": ("Perfume", 329),
    "Sisley": ("Skin Care", 922),
    "Dior Beauty": ("Lips", 250),
    "CPB": ("Skin Care", 1034),
    "L'Oreal": ("Skin Care", 5),
}

rules = {
    "Perfume": 0.67,
    "Skin Care": 0.5,
    "Cloth": 0.9,
}

print(shop.items())
after_20off = {
    brand: (category, price * 0.8) for brand, (category, price) in shop.items()
}
print(after_20off)

today = {
    brand: (category, price * rules.get(category, 1))
    for brand, (category, price) in shop.items()
}
print(today)

# 输出结果
print("折扣后价格：")
for product, (category, final_price) in shop.items():
    print(f"{product}({category}): 原价{shop[product][1]}元 → 折后{final_price:.2f}元")
######################################
func = [lambda x: x + i for i in range(3)]
# func = [lambda x: x + 0, lambda x: x + 1, lambda x: x + 2]
func_list = []
for i in range(3):

    def Lambda(x):
        return x + i

    func_list.append(Lambda)

print(func_list[0](10))
print(func_list[1](10))
print(func_list[2](10))


print(func)
print(func[0])
a = func[0](10)
print(a)
